#pragma once

#include <vector>
#include <glm\glm.hpp>


// El codigo que comparten los constructores de superficies
class BuilderHelper {
public:
	BuilderHelper(float limInferior, float limSuperior);
	~BuilderHelper();

	std::vector<glm::vec3> buildNormales(unsigned int cantPtsCurva, const std::vector<glm::vec3> &vecVertices) const;
	std::vector<glm::vec2> buildCoordsTextura(unsigned int cantHorizontal, unsigned int cantVertical) const;
	std::vector<unsigned int> buildIndexBuffer(unsigned int cantHorizontal, unsigned int cantVertical) const;

private:
	const float m_limInferior;
	const float m_limSuperior;

	// Usa metodos numericos para calcular la normal
	glm::vec3 calcularNormal(glm::vec3 punto0, glm::vec3 puntoX, glm::vec3 puntoY, bool revertir) const;
};

